#!/usr/bin/expect -f
#
#
#
set timeout 30
spawn scp -r dist/* root@192.168.53.1:/www 
expect {
"(yes/no)?"
{
send  "yes\n"
expect "password:"  { send  "123456\n" }
}
# 上面是第一次登录会提示是否允许，send yes，
# 下面是非第一次提示，直接发送密码
"password:"
{
send "123456\n"
}
}
expect eof
